package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/orderhandling")
public class WmsOrderhandlingRouter {
    @Autowired
    SysMenuService menuService;
    @RequestMapping(value = "selectorderhandling/{menu}")
    public String purchase(@PathVariable("menu") String menu, Model model) {
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "outOperation/orderhandling/orderhandling";
    }
    // 查看拆单明细
    @RequestMapping(value = "SeparatedDetail")
    public String SeparatedDetail(){return "outOperation/orderhandling/searchSeparatedDetail";}

    // 查看拆单行
    @RequestMapping(value = "SeparatedRow")
    public String SeparatedRow(String id, Model model){
        model.addAttribute("id",id);
        return "outOperation/orderhandling/searchSeparatedRow";
    }

    // 查看分配明细
    @RequestMapping(value = "AllocationDetail")
    public String AllocationDetail(){return "outOperation/orderhandling/searchAllocationDetail";}

    // 查看分配行
    @RequestMapping(value = "AllocationRow")
    public String AllocationRow(String id, Model model){
        model.addAttribute("id",id);
        return "outOperation/orderhandling/searchAllocationRow";
    }

    // 查看装箱明细
    @RequestMapping(value = "PackingDetail")
    public String PackingDetail(){return "outOperation/orderhandling/searchPackingDetail";}
}
